# 私有属性, 只有自己知道
class Women:
    def __init__(self, name):
        self.name = name
        self.__age = 18

    # 私有方法
    def __eat(self):
        print(self.name, 'Women eat...吃相难看......')

    def eat_buti(self):
        print('美化一下...')
        self.__eat()

    # 特性 特殊的属性,特殊在哪里呢, 原本是个方法
    @property
    def get_age(self):
        return self.__age

    def set_age(self, age):
        self.__age = age


w = Women('rose')

# print(w.name)
# # print(w.__age)
#
# # print(w.get_age())
# w.set_age(28)
# # print(w.get_age())
#
# w.name = 'cuihua'
# w.name = 'cuihua2'
# w.name = 'cuihua3'
#
# # print(w._Women__age)
# # print(dir(w))
# # help(w)
#
# # w.__eat()
#
# # w.eat_buti()

w._Women__eat()

print(w.get_age)

print(w.name)
w.name = 'hahahh'

print(w.name)

w.get_age = 19  # AttributeError: can't set attribute

print(w.get_age)
